This sure was annoying to parallelize.